package com.sskj.hangqing.presenter;

import com.lzy.okrx2.adapter.FlowableBody;
import com.sskj.common.base.HttpData;
import com.sskj.lib.bean.PageBean;
import com.sskj.lib.http.JsonConverter;
import com.sskj.hangqing.bean.GuideListBean;
import com.sskj.hangqing.ui.activity.GonggaoListActivity;

import java.util.List;

import io.reactivex.Flowable;


public class GonggaoListActivityPresenter extends BasePresenter<GonggaoListActivity> {
    public Flowable<List<GuideListBean>> getData(String page) {
        return httpService.getGonggaoList(page)
                .converter(new JsonConverter<HttpData<PageBean<GuideListBean>>>() {
                })
                .adapt(new FlowableBody<>())
                .map(pageBeanHttpData -> pageBeanHttpData.getData().getList());
    }


}
